package esi.t2no1.util;

import java.util.List;

/**
 * Contains utility methods for DAO operations
 * 
 * @author Kaarel Jõgeva
 */
public class DaoUtil {

	private DaoUtil() {
		// Do not allow instances
	}

	public static <T> T extractFirst(List<T> results) {
		if (results == null || results.isEmpty()) {
			return null;
		}

		return results.get(0);
	}

}
